package cn.exrick.xboot.vip.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableField;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 会员卡
 * </p>
 *
 * @author yuhaifei
 * @since 2022-10-09
 */
@Data
@TableName("vip_card")
@ApiModel(value = "会员卡")
public class VipCard implements Serializable {

private static final long serialVersionUID = 1L;

/**
 * 
 */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "id")
    @ApiModelProperty(value = "")
    private Long id;

    /**
     * 会员卡id
     */
    @TableField(value = "card_id")
    @ApiModelProperty(value = "会员卡id")
    private String cardId;

    /**
     * 会员id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "member_id")
    @ApiModelProperty(value = "会员id")
    private Long memberId;

    /**
     * openid
     */
    @TableField(value = "open_id")
    @ApiModelProperty(value = "openid")
    private String openId;

    /**
     * 金额
     */
    @TableField(value = "card_money")
    @ApiModelProperty(value = "金额")
    private Double cardMoney;

    /**
     * 积分
     */
    @TableField(value = "card_core")
    @ApiModelProperty(value = "积分")
    private Double cardCore;

    /**
     * 卡片等级
     */
    @TableField(value = "card_level")
    @ApiModelProperty(value = "卡片等级")
    private Integer cardLevel;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 最后消费日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "modify_time")
    @ApiModelProperty(value = "最后消费日期")
    private Date modifyTime;

    /**
     * 姓名
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "real_name")
    @ApiModelProperty(value = "姓名")
    private String realName;

    /**
     * 生日
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField(value = "birth")
    @ApiModelProperty(value = "生日")
    private Date birth;

    /**
     * 性别
     */
    @TableField(value = "sex")
    @ApiModelProperty(value = "性别")
    private String sex;

    /**
     * 身份证号码
     */
    @TableField(value = "idcard")
    @ApiModelProperty(value = "身份证号码")
    private String idcard;

}
